package a.d;

public class c
{
  private static final double a = 1.E-005D;
  private double b;
  private double c;
  private double d;
  public static boolean e;
  
  public c(w paramw, z paramz)
  {
    this(paramw, z.a(paramw, paramz));
  }
  
  public c(w paramw1, w paramw2)
  {
    if (!w.e)
    {
      if (a(paramw1.a(), paramw2.a()))
      {
        this.b = 1.0D;
        this.c = 0.0D;
        this.d = (-paramw1.a());
        return;
      }
      this.c = -1.0D;
    }
    double d1 = (paramw2.b() - paramw1.b()) / (paramw2.a() - paramw1.a());
    double d2 = paramw1.b() - paramw1.a() * d1;
    this.b = d1;
    this.d = d2;
  }
  
  public double a()
  {
    return this.b;
  }
  
  public double b()
  {
    return this.c;
  }
  
  public double c()
  {
    return this.d;
  }
  
  public String toString()
  {
    return "a: " + this.b + " b: " + this.c + " c: " + this.d;
  }
  
  public w a(w paramw)
  {
    if (!w.e) {
      if (a(this.c)) {
        return null;
      }
    }
    double d1 = (-this.b * paramw.a() - this.d) / this.c;
    return new w(paramw.a(), d1);
  }
  
  public w b(w paramw)
  {
    if (!w.e) {
      if (a(this.b)) {
        return null;
      }
    }
    double d1 = (-this.c * paramw.b() - this.d) / this.b;
    return new w(d1, paramw.b());
  }
  
  public static w a(c paramc1, c paramc2)
  {
    boolean bool = w.e;
    if (!bool) {
      if (a(paramc1.a()))
      {
        if (bool) {
          break label44;
        }
        if (a(paramc2.a())) {
          return null;
        }
      }
    }
    label44:
    if (!bool)
    {
      if (a(paramc1.b()))
      {
        if (bool) {
          break label81;
        }
        if (a(paramc2.b())) {
          return null;
        }
      }
      if (bool) {
        break label96;
      }
    }
    if (a(paramc2.b()))
    {
      label81:
      c localc = paramc1;
      paramc1 = paramc2;
      paramc2 = localc;
    }
    label96:
    double d3 = paramc1.a();
    double d4 = paramc1.b();
    double d5 = -paramc1.c();
    if (!bool) {
      if (!a(d3))
      {
        double d6 = paramc2.b() - paramc2.a() / d3 * d4;
        double d7 = -paramc2.c() - paramc2.a() / d3 * d5;
        d2 = d7 / d6;
        d1 = (d5 - d2 * d4) / d3;
        return new w(d1, d2);
      }
    }
    double d2 = d5 / d4;
    double d1 = (paramc2.c() + paramc2.b() * d2) / -paramc2.a();
    return new w(d1, d2);
  }
  
  private static boolean a(double paramDouble)
  {
    return a(paramDouble, 0.0D);
  }
  
  private static boolean a(double paramDouble1, double paramDouble2)
  {
    if (!w.e) {}
    return Math.abs(paramDouble1 - paramDouble2) < 1.E-005D;
  }
}


/* Location:           E:\idea\
 * Qualified Name:     a.d.c
 * JD-Core Version:    0.7.0.1
 */